<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>个人中心</title>
  <link rel="stylesheet" href="./css/base.css">
  <link rel="stylesheet" href="./css/user.css">
  <script src="./js/base.js"></script>
</head>

<body>
  <div class="wrap" id="user">
    <a v-if="!info.portrait && !info.nickname" href="./login.html" class="top-info">
      <img class="avatar" src="./images/avatar.png" />
      <div class="top-name">点击登录</div>
    </a>
    <div v-else class="top-info">
      <img class="avatar" :src="info.portrait" />
      <div class="top-name">您好，{{info.nickname}}</div>
    </div>
    <div class="menu-list">
      <div class="menu-row">
        <div class="icon-box">
          <img class="m-icon1" src="./images/set.png" />
        </div>
        <div class="menu-text"> 设置信息 </div>
        <div class="link">></div>
      </div>
    </div>
    <div class="tabbar">
      <a href="./index.html" class="tab-item">
        <img src="./images/home.png" alt="">
        <span class="tab-text">首页</span>
      </a>
      <a href="./user.html" class="tab-item">
        <img src="./images/my_act.png" alt="">
        <span class="tab-text">我的</span>
      </a>
    </div>
  </div>
</body>
<script src="./js/vue.js"></script>
<script>
  var user = new Vue({
    el: '#user',
    data () {
      return {
        info: {}
      }
    },
    created() {
      this.info = getSession('userInfo');
    }
  })
</script>

</html>